#pragma once
#include "CGALDefinition.h"
#include "CGAL_IO_OBJ.h"
#include "MorphologicalProc.h"
#include "ComponentConnectivityGraph.h"
#include "MeshSimplification.h"

#ifdef MYLIB_API_EXPORT
#define MYLIB_API __declspec(dllexport)
#else
#define MYLIB_API __declspec(dllimport)
#endif

class MYLIB_API CGeneralizationAPI
{

public:
	CGeneralizationAPI(void);
	~CGeneralizationAPI(void);

public:
	//format conversion
	void myObj2Off(bool mode);
	
	// vary the color of obj
	//#define OBJPATH "D:\\Docs\\paper\\+Semantic enhanced generalisation of CityGML scene based on apperence preserved QEM\\data\\debug\\minkowIKi\\"
	void varycolor(Parser_obj* parser);
	
	//validate the model (manifold and close)
	void myModelValidation();

	void simplification_model();

	//do generalization(paper work)
	ModelOBJ* do_generalization(ModelOBJ* myModel, std::string objname, float size, int bType, float fTol);

	//aggregate all the models
	Polyhedron_3* do_aggregation(ModelOBJ* myModel);
	
	//postproc 
	bool do_post_proc(ModelOBJ* myModel, float size, int iFlag = 1/*0 just closing; 1 just opening; 2 elimination*/);
	
	//genralization for paper mortise and tenon/masonry
	void do_Selection();
};


